// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';

/** 新增品牌 POST /fds/goods/addGdBrand */
export async function addGdBrandUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.addGdBrandUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_42>('/fds/goods/addGdBrand', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 新增商品名分类 POST /fds/goods/addGdClass */
export async function addGdClassUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.addGdClassUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_46>('/fds/goods/addGdClass', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 新增商品名 POST /fds/goods/addGoods */
export async function addGoodsUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.addGoodsUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_41>('/fds/goods/addGoods', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 删除品牌信息 POST /fds/goods/deleteGdBrand */
export async function deleteGdBrandUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteGdBrandUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<boolean>('/fds/goods/deleteGdBrand', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 删除分类信息 POST /fds/goods/deleteGdClass */
export async function deleteGdClassUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteGdClassUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<boolean>('/fds/goods/deleteGdClass', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 删除商品名信息 POST /fds/goods/deleteGoods */
export async function deleteGoodsUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteGoodsUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<boolean>('/fds/goods/deleteGoods', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 导出品牌 POST /fds/goods/exportGdBrand */
export async function exportGdBrandUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.exportGdBrandUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<any>('/fds/goods/exportGdBrand', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 导出商品分类 POST /fds/goods/exportGdClass */
export async function exportGdClassUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.exportGdClassUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<any>('/fds/goods/exportGdClass', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 导出商品名 POST /fds/goods/exportGoods */
export async function exportGoodsUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.exportGoodsUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<any>('/fds/goods/exportGoods', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取品牌信息 GET /fds/goods/getGdBrand */
export async function getGdBrandUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getGdBrandUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_42>('/fds/goods/getGdBrand', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取品牌列表 POST /fds/goods/getGdBrandList */
export async function getGdBrandListUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getGdBrandListUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.PageResultGdBrandDto_>('/fds/goods/getGdBrandList', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取商品名分类信息 GET /fds/goods/getGdClass */
export async function getGdClassUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getGdClassUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_46>('/fds/goods/getGdClass', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取商品名分类列表 POST /fds/goods/getGdClassList */
export async function getGdClassListUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getGdClassListUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.PageResultGdClassDto_>('/fds/goods/getGdClassList', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取商品名信息 GET /fds/goods/getGoods */
export async function getGoodsUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getGoodsUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_41>('/fds/goods/getGoods', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取商品列名表 POST /fds/goods/getGoodsList */
export async function getGoodsListUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getGoodsListUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.PageResultGoodsDto_>('/fds/goods/getGoodsList', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取商品价格列表 POST /fds/goods/getPriceList */
export async function getPriceListUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getPriceListUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.PageResultGoodsDto_>('/fds/goods/getPriceList', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 导入商品名 POST /fds/goods/importGoods */
export async function importGoodsUsingPOST(
  body: {},
  file?: File,
  options?: { [key: string]: any },
) {
  const formData = new FormData();

  if (file) {
    formData.append('file', file);
  }

  Object.keys(body).forEach((ele) => {
    const item = (body as any)[ele];

    if (item !== undefined && item !== null) {
      formData.append(
        ele,
        typeof item === 'object' && !(item instanceof File) ? JSON.stringify(item) : item,
      );
    }
  });

  return request<boolean>('/fds/goods/importGoods', {
    method: 'POST',
    data: formData,
    requestType: 'form',
    ...(options || {}),
  });
}

/** 合并品牌 POST /fds/goods/mergeGdBrand */
export async function mergeGdBrandUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.mergeGdBrandUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<boolean>('/fds/goods/mergeGdBrand', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 合并商品名分类 POST /fds/goods/mergeGdClass */
export async function mergeGdClassUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.mergeGdClassUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<boolean>('/fds/goods/mergeGdClass', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 合并商品名 POST /fds/goods/mergeGoods */
export async function mergeGoodsUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.mergeGoodsUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<boolean>('/fds/goods/mergeGoods', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 设置商品生效时间 POST /fds/goods/setGoodsEffDate */
export async function setGoodsEffDateUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.setGoodsEffDateUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<boolean>('/fds/goods/setGoodsEffDate', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改品牌信息 POST /fds/goods/updateGdBrand */
export async function updateGdBrandUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateGdBrandUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_42>('/fds/goods/updateGdBrand', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改商品名分类 POST /fds/goods/updateGdClass */
export async function updateGdClassUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateGdClassUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_46>('/fds/goods/updateGdClass', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改商品名信息 POST /fds/goods/updateGoods */
export async function updateGoodsUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateGoodsUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.Pinyin_41>('/fds/goods/updateGoods', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 批量修改商品名信息 POST /fds/goods/updateGoodsBatch */
export async function updateGoodsBatchUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateGoodsBatchUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<boolean>('/fds/goods/updateGoodsBatch', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
